package cn.zhoutingrui.pethome.emp.controller;

import cn.zhoutingrui.pethome.emp.domain.Employee;
import cn.zhoutingrui.pethome.emp.service.IEmployeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

@RestController
@RequestMapping("/emp")
@Api(value = "员工api",description = "员工相关增删改查")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;

    @RequestMapping(method = RequestMethod.GET)
    @ApiOperation("查询所有员工")
    public List<Employee> findAll(){
        List<Employee> emps = employeeService.findAll();
        return emps;
    }
}
